﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
  public  class GroupBiz
    {
      GroupDao groupDao = new GroupDao();
        public bool Insert(string tableName, SortedDictionary<string, string> sdList)
        {
          return  groupDao.Insert(tableName, sdList);
        }
        public bool Update(string tableName, SortedDictionary<string, string> sdList)
        {
            return groupDao.Update(tableName, sdList);
        }
        public string Delete(string tableName, string[] primaryKey)
        {
            return groupDao.Delete(tableName, primaryKey);
        }

        public DataTable GetGroupOne(string groupID)
        {
             return groupDao.GetGroupOne(groupID);
        }
        public DataTable GetGroupLists(string account, string gType, string key)
        {
            bool right = AccountBiz.IsSuperGroup(account);//超级用户组，就可以查看全部
            return groupDao.GetGroupLists(account, gType, key, right);
        }
        public DataTable GetGUserLists(string groupID)
        {
             return groupDao.GetGUserLists(groupID);
        }

    }
}
